<template>
    <div>
        <Row class="formRow">
          <Col :lg="2" :md="6" :xs="12" class="rightRow">
            <span class="ModelInputTitle">医院名称</span>
          </Col>
          <Col  :lg="2" :md="6" :xs="12" class="leftRow">
            <Input v-model="formInline.hospitalName" placeholder="医院名称" clearable style="width: 100%" size="large"></Input>
          </Col>
          <Col  :lg="2" :md="6" :xs="12"class="rightRow">
          <span class="ModelInputTitle">医院代码</span>
          </Col>
          <Col  :lg="2" :md="6" :xs="12" class="leftRow">
              <Input v-model="formInline.hospitalCode" placeholder="医院代码" clearable style="width: 100%" size="large"></Input>
          </Col>
          <Col  :lg="3" :md="6" :xs="12" class="rightRow">
            <span class="ModelInputTitle" title="医院名称拼音简写" style="width: 100%;text-align: right">医院名称拼音简写</span>
          </Col>
          <Col  :lg="3" :md="6" :xs="12" class="leftRow">
            <Input v-model="formInline.pinyinName" placeholder="医院名称拼音简写" clearable style="width: 100%" size="large"></Input>
          </Col>
          <Col  :lg="2" :md="6" :xs="12" class="rightRow">
          <span class="ModelInputTitle">医院等级</span>
          </Col>
          <Col  :lg="2" :md="6" :xs="12" class="leftRow">
            <Select  size="large" style="width:100%" v-model="formInline.level" placeholder="医院等级">
              <Option v-for="l in hospitalLevel"  :value="l.dataCode" :key="l.id">{{l.dataName}}</Option>
            </Select>
          </Col>

          <Col  :lg="3" :md="6" :xs="12" class="rightRow">
           <span class="ModelInputTitle" style="width: 100%;text-align: right">报告配送方式</span>
          </Col>
          <Col  :lg="3" :md="6" :xs="12" class="leftRow">
            <Select  size="large" style="width:100%" v-model="formInline.reportDelivery" placeholder="报告配送方式">
              <Option v-for="d in hospitalReportDelivery"  :value="d.dataCode" :key="d.id">{{d.dataName}}</Option>
            </Select>
          </Col>
        </Row>

        <Row class="formRow" style="margin-top: 20px">
          <Col  :lg="2" :md="6" :xs="12" class="rightRow">
          <span class="ModelInputTitle">报告抬头</span>
          </Col>
          <Col  :lg="2" :md="6" :xs="12" class="leftRow">
          <Select  size="large" style="width:100%" v-model="formInline.reportTitle" placeholder="报告抬头">
            <Option v-for="t in hospitalReportTitle"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
          <Col  :lg="1" :md="6" :xs="12" class="rightRow">
            <span class="ModelInputTitle">省</span>
          </Col>
          <Col  :lg="2" :md="6" :xs="12" class="leftRow">
          <Select  size="large" style="width:100%" v-model="formInline.provinceCd" placeholder="省" @on-change="pchange">
            <Option v-for="p in provinceArr"  :value="p.regionCode" :key="p.id">{{p.regionName}}</Option>
          </Select>
          </Col>
          <Col  :lg="1" :md="6" :xs="12" class="rightRow">
          <span class="ModelInputTitle">市</span>
          </Col>
          <Col  :lg="2" :md="6" :xs="12" class="leftRow">
          <Select  size="large" style="width:100%" v-model="formInline.cityCd" placeholder="市"  @on-change="schange">
            <Option v-for="c in cityArr"  :value="c.regionCode" :key="c.id">{{c.regionName}}</Option>
          </Select>
          </Col>
          <Col  :lg="1" :md="6" :xs="12" class="rightRow">
          <span class="ModelInputTitle">区</span>
          </Col>
          <Col  :lg="2" :md="6" :xs="12" class="leftRow">
            <Select  size="large" style="width:100%" v-model="formInline.areaCd" placeholder="区">
              <Option v-for="a in areaArr"  :value="a.regionCode" :key="a.id">{{a.regionName}}</Option>
            </Select>
          </Col>
          <Col  :lg="2" :md="6" :xs="12" class="rightRow">
          <span class="ModelInputTitle">是否采样点</span>
          </Col>
          <Col  :lg="2" :md="6" :xs="12" class="leftRow">
            <Select  size="large" style="width:100%" v-model="formInline.samplingLocation" placeholder="是否采样点">
              <Option  value="1" >是</Option>
              <Option  value="0" >否</Option>
            </Select>
          </Col>
          <Col  :lg="2" :md="6" :xs="12" class="rightRow">
          <span class="ModelInputTitle">是否有效</span>
          </Col>
          <Col  :lg="2" :md="6" :xs="12" class="leftRow">
            <Select  size="large" style="width:100%" v-model="formInline.validFlag" placeholder="是否有效">
              <Option  value="1" >是</Option>
              <Option  value="0" >否</Option>
            </Select>
          </Col>
          <Col  :lg="3" :md="12" :xs="24"  class="leftRow buttonAlign">
            <Button type="primary" @click="onSubmit">查询</Button>
            <Button type="primary" @click="resetForm">重置</Button>
            <Button type="primary" @click="onAdd">添加</Button>
          </Col>
        </Row>

      <Table :data="tableData" :columns="cloums" stripe :loading="loading"  style="margin-top: 20px"></Table>
      <div style="margin: 10px;overflow: hidden">
        <div style="float: right;">
          <Page :total="total" :current="1" :placement="placement" @on-change="changePage" show-total show-elevator show-sizer @on-page-size-change="changeSize"></Page>
        </div>
      </div>

      <Modal
        v-model="add"
        title="添加"
        @on-ok="addok"
        @on-cancel="cancel('您取消了操作')" width="600">
        <Row>
          <Col span="12">   <span class="ModelInputTitle"><Icon type="ios-medical" color="red"></Icon>医院名称</span><Input size="large" v-model="addForm.hospitalName" style="width: 203px" placeholder="医院名称"></Input></Col>
          <Col span="12">   <span class="ModelInputTitle" style="width: 100px"><Icon type="ios-medical" color="red"></Icon>医院拼音简写</span><Input v-model="addForm.pinyinName" size="large" style="width: 183px" placeholder="医院拼音简写"></Input></Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">省</span>
            <Select  size="large" style="width:200px" v-model="addForm.provinceCd" placeholder="省" @on-change="pchange">
              <Option v-for="p in provinceArr"  :value="p.regionCode" :key="p.id">{{p.regionName}}</Option>
            </Select></Col>
          <Col span="12">   <span class="ModelInputTitle">市</span>
            <Select  size="large" style="width:200px" v-model="addForm.cityCd" placeholder="市"  @on-change="schange">
              <Option v-for="c in cityArr"  :value="c.regionCode" :key="c.id">{{c.regionName}}</Option>
            </Select>
          </Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">区</span>
            <Select  size="large" style="width:200px" v-model="addForm.areaCd" placeholder="区">
              <Option v-for="a in areaArr"  :value="a.regionCode" :key="a.id">{{a.regionName}}</Option>
            </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">详细地址</span><Input v-model="addForm.dtlAddress" size="large" style="width: 203px" placeholder="详细地址"></Input></Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">医院等级</span>
            <Select  size="large" style="width:200px" v-model="addForm.level" placeholder="医院等级">
              <Option v-for="l in hospitalLevel"  :value="l.dataCode" :key="l.id">{{l.dataName}}</Option>
            </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">报告抬头</span>
          <Select  size="large" style="width:200px" v-model="addForm.reportTitle" placeholder="报告抬头">
            <Option v-for="t in hospitalReportTitle"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">报告配送方式</span>
          <Select  size="large" style="width:200px" v-model="addForm.reportDelivery" placeholder="报告配送方式">
            <Option v-for="d in hospitalReportDelivery"  :value="d.dataCode" :key="d.id">{{d.dataName}}</Option>
          </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">检验中心</span>
          <Select  size="large" style="width:200px" v-model="addForm.testCenterId" placeholder="检验中心">
            <Option v-for="t in testCenter"  :value="t.id" :key="t.testcenterCd">{{t.testcenterName}}</Option>
          </Select>
          </Col>
        </Row>
          <Row style="margin-top: 20px">
            <Col span="12">   <span class="ModelInputTitle">是否有效</span>
            <Select  size="large" style="width:200px" v-model="addForm.validFlag" placeholder="是否有效">
              <Option value="1">是</Option>
              <Option value="0">否</Option>
            </Select>
            </Col>
            <Col span="12">   <span class="ModelInputTitle">法人代表</span>
            <Input v-model="addForm.legalPerson" size="large" style="width: 200px" placeholder="法人代表"></Input>
            </Col>
          </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">诊所联系电话</span>
          <Input v-model="addForm.hospitalTel" size="large" style="width: 200px" placeholder="诊所联系电话"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">负责人姓名</span>
          <Input v-model="addForm.hospitalMaster" size="large" style="width: 200px" placeholder="法人代表"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">负责人电话</span>
          <Input v-model="addForm.masterTel" size="large" style="width: 200px" placeholder="负责人电话"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">法人名称</span>
          <Input v-model="addForm.legalPersonName" size="large" style="width: 200px" placeholder="法人名称"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">法人资质证明编号</span>
          <Input v-model="addForm.legalPersonSN" size="large" style="width: 200px" placeholder="法人资质证明编号"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">所有制性质</span>
          <Select  size="large" style="width:200px" v-model="addForm.hospitalProperties" placeholder="所有制性质">
            <Option v-for="t in hospitalProperties"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">所有制形式</span>
          <Select  size="large" style="width:200px" v-model="addForm.hospitalMode" placeholder="所有制形式">
            <Option v-for="t in hospitalMode"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">开设科室</span>
          <Select  size="large" style="width:200px" v-model="addForm.hospitalOffices" placeholder="开设科室" multiple :on-select-selected="selectOffice">
            <Option v-for="t in hospitalOffices"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">开设科室其他</span>
          <Input v-model="addForm.hospitalOfficesOther" size="large" style="width: 200px" placeholder="开设科室其他"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">科室个数</span>
          <Input v-model="addForm.hospitalOfficesNum" size="large" style="width: 200px" placeholder="科室个数"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">服务规模</span>
          <Select  size="large" style="width:200px" v-model="addForm.hospitalServiceNum" placeholder="服务规模">
            <Option v-for="t in hospitalServiceNum"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">门诊量</span>
          <Input v-model="addForm.hospitalPatientNum" size="large" style="width: 200px" placeholder="门诊量"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">HIS厂商</span>
          <Input v-model="addForm.hospitalHIS" size="large" style="width: 200px" placeholder="HIS厂商"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">LIS厂商</span>
          <Input v-model="addForm.hospitalLIS" size="large" style="width: 200px" placeholder="LIS厂商"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">是否开展检验</span>
          <Select  size="large" style="width:200px" v-model="addForm.hospitalTest" placeholder="是否开展检验">
            <Option v-for="t in hospitalTest"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">结算方式</span>
          <Select  size="large" style="width:200px" v-model="addForm.settlementMode" placeholder="结算方式">
            <Option v-for="t in settlementMode"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">医生需求</span>
          <Input v-model="addForm.doctorDemand" size="large" style="width: 200px" placeholder="医生需求"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">填写人</span>
          <Input v-model="addForm.writeUser" size="large" style="width: 200px" placeholder="填写人"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">填写人电话</span>
          <Input v-model="addForm.writeUserTel" size="large" style="width: 200px" placeholder="填写人电话"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">填写时间</span>
          <DatePicker type="date" v-model="addForm.writeTime" placeholder="填写时间" style="width: 200px"></DatePicker>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="24">   <span class="ModelInputTitle">检验项目其他要求</span>
          <Input v-model="addForm.projectDemand" size="large" style="width: 483px" placeholder="检验项目其他要求"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="4"> <span class="ModelInputTitle">附件</span></Col>
          <Col span="20">
          <!--<Upload multiple-->
            <!--:on-success = "uploadSucc" :on-remove="fileList"-->
            <!--action="https://wx.ailabcare.com/clinicalmall-web/hospital/uploadHospital">-->
            <!--<div style="padding: 20px 0;width:433px;border:1px dashed #ddd;text-align: center" v-if="pic">-->
              <!--<Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>-->
              <!--<p>Click files here to upload</p>-->
            <!--</div>-->
            <!--<div><img :src="img1.jpg" alt="首焦图" v-if="!pic" style="padding: 20px 0;width:430px;border:1px dashed #ddd;"></div>-->
          <!--</Upload>-->
          <div class="demo-upload-list" v-for="item in uploadList">
            <template v-if="item.status === 'finished'">
              <img :src="item.response.data.fileUrl">
              <div class="demo-upload-list-cover">
                <icon type="ios-eye-outline" @click.native="handleView(item)"></icon>
                <icon type="ios-trash-outline" @click.native="handleRemove(item)"></icon>
              </div>
            </template>
            <template v-else>
              <i-progress v-if="item.showProgress" :percent="item.percentage" hide-info></i-progress>
            </template>
          </div>
          <upload
            ref="upload"
            :show-upload-list="false"
            :default-file-list="defaultList"
            :on-success="handleSuccess"

            multiple
            type="drag"
            action="https://wx.ailabcare.com/clinicalmall-web/hospital/uploadHospital"
            style="display: inline-block;width:58px;">
            <div style="width: 58px;height:58px;line-height: 58px;">
              <icon type="camera" size="20"></icon>
            </div>
          </upload>
          </Col>
        </Row>
      </Modal>

      <Modal
        v-model="edit"
        title="编辑"
        @on-ok="editok"
        @on-cancel="cancel('您取消了操作')" width="600">
        <Row>
          <Col span="12">   <span class="ModelInputTitle"><Icon type="ios-medical" color="red"></Icon>医院名称</span><Input size="large" v-model="editForm.hospitalName" style="width: 203px" placeholder="医院名称"></Input></Col>
          <Col span="12">   <span class="ModelInputTitle" style="width: 100px"><Icon type="ios-medical" color="red"></Icon>医院拼音简写</span><Input v-model="editForm.pinyinName" size="large" style="width: 183px" placeholder="医院拼音简写"></Input></Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">省</span>
          <Select  size="large" style="width:200px" v-model="editForm.provinceCd" placeholder="省" @on-change="pchange">
            <Option v-for="p in provinceArr"  :value="p.regionCode" :key="p.id">{{p.regionName}}</Option>
          </Select></Col>
          <Col span="12">   <span class="ModelInputTitle">市</span>
          <Select  size="large" style="width:200px" v-model="editForm.cityCd" placeholder="市"  @on-change="schange">
            <Option v-for="c in cityArr"  :value="c.regionCode" :key="c.id">{{c.regionName}}</Option>
          </Select>
          </Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">区</span>
          <Select  size="large" style="width:200px" v-model="editForm.areaCd" placeholder="区">
            <Option v-for="a in areaArr"  :value="a.regionCode" :key="a.id">{{a.regionName}}</Option>
          </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">详细地址</span><Input v-model="editForm.dtlAddress" size="large" style="width: 203px" placeholder="详细地址"></Input></Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">医院等级</span>
          <Select  size="large" style="width:200px" v-model="editForm.level" placeholder="医院等级">
            <Option v-for="l in hospitalLevel"  :value="l.dataCode" :key="l.id">{{l.dataName}}</Option>
          </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">报告抬头</span>
          <Select  size="large" style="width:200px" v-model="editForm.reportTitle" placeholder="报告抬头">
            <Option v-for="t in hospitalReportTitle"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">报告配送方式</span>
          <Select  size="large" style="width:200px" v-model="editForm.reportDelivery" placeholder="报告配送方式">
            <Option v-for="d in hospitalReportDelivery"  :value="d.dataCode" :key="d.id">{{d.dataName}}</Option>
          </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">检验中心</span>
          <Select  size="large" style="width:200px" v-model="editForm.testCenterId" placeholder="检验中心">
            <Option v-for="t in testCenter"  :value="t.id" :key="t.testcenterCd">{{t.testcenterName}}</Option>
          </Select>
          </Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">是否有效</span>
          <Select  size="large" style="width:200px" v-model="editForm.validFlag" placeholder="是否有效">
            <Option value="1">是</Option>
            <Option value="0">否</Option>
          </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">法人代表</span>
          <Input v-model="editForm.legalPerson" size="large" style="width: 200px" placeholder="法人代表"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">诊所联系电话</span>
          <Input v-model="editForm.hospitalTel" size="large" style="width: 200px" placeholder="诊所联系电话"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">负责人姓名</span>
          <Input v-model="editForm.hospitalMaster" size="large" style="width: 200px" placeholder="法人代表"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">负责人电话</span>
          <Input v-model="editForm.masterTel" size="large" style="width: 200px" placeholder="负责人电话"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">法人名称</span>
          <Input v-model="editForm.legalPersonName" size="large" style="width: 200px" placeholder="法人名称"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">法人资质证明编号</span>
          <Input v-model="editForm.legalPersonSN" size="large" style="width: 200px" placeholder="法人资质证明编号"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">所有制性质</span>
          <Select  size="large" style="width:200px" v-model="editForm.hospitalProperties" placeholder="所有制性质">
            <Option v-for="t in hospitalProperties"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">所有制形式</span>
          <Select  size="large" style="width:200px" v-model="editForm.hospitalMode" placeholder="所有制形式">
            <Option v-for="t in hospitalMode"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">开设科室</span>
          <Select  size="large" style="width:200px" v-model="editForm.hospitalOffices" placeholder="开设科室" multiple :on-select-selected="selectOffice">
            <Option v-for="t in hospitalOffices"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">开设科室其他</span>
          <Input v-model="editForm.hospitalOfficesOther" size="large" style="width: 200px" placeholder="开设科室其他"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">科室个数</span>
          <Input v-model="editForm.hospitalOfficesNum" size="large" style="width: 200px" placeholder="科室个数"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">服务规模</span>
          <Select  size="large" style="width:200px" v-model="editForm.hospitalServiceNum" placeholder="服务规模">
            <Option v-for="t in hospitalServiceNum"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">门诊量</span>
          <Input v-model="editForm.hospitalPatientNum" size="large" style="width: 200px" placeholder="门诊量"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">HIS厂商</span>
          <Input v-model="editForm.hospitalHIS" size="large" style="width: 200px" placeholder="HIS厂商"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">LIS厂商</span>
          <Input v-model="editForm.hospitalLIS" size="large" style="width: 200px" placeholder="LIS厂商"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">是否开展检验</span>
          <Select  size="large" style="width:200px" v-model="editForm.hospitalTest" placeholder="是否开展检验">
            <Option v-for="t in hospitalTest"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">结算方式</span>
          <Select  size="large" style="width:200px" v-model="editForm.settlementMode" placeholder="结算方式">
            <Option v-for="t in settlementMode"  :value="t.dataCode" :key="t.id">{{t.dataName}}</Option>
          </Select>
          </Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">医生需求</span>
          <Input v-model="editForm.doctorDemand" size="large" style="width: 200px" placeholder="医生需求"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">填写人</span>
          <Input v-model="editForm.writeUser" size="large" style="width: 200px" placeholder="填写人"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">填写人电话</span>
          <Input v-model="editForm.writeUserTel" size="large" style="width: 200px" placeholder="填写人电话"></Input>
          </Col>
          <Col span="12">   <span class="ModelInputTitle">填写时间</span>
          <DatePicker type="date" v-model="editForm.writeTime" placeholder="填写时间" style="width: 200px"></DatePicker>
          </Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="12">   <span class="ModelInputTitle">是否采样点</span>
          <Select  size="large" style="width:200px" v-model="editForm.samplingLocation" placeholder="是否采样点">
            <Option value="1">是</Option>
            <Option value="0">否</Option>
          </Select>
          </Col>
        </Row>
        <Row style="margin-top: 20px">
          <Col span="24">   <span class="ModelInputTitle">检验项目其他要求</span>
          <Input v-model="editForm.projectDemand" size="large" style="width: 483px" placeholder="检验项目其他要求"></Input>
          </Col>
        </Row>

        <Row style="margin-top: 20px">
          <Col span="4"> <span class="ModelInputTitle">附件</span></Col>
          <Col span="20">
          <!--<Upload multiple-->
          <!--:on-success = "uploadSucc" :on-remove="fileList"-->
          <!--action="https://wx.ailabcare.com/clinicalmall-web/hospital/uploadHospital">-->
          <!--<div style="padding: 20px 0;width:433px;border:1px dashed #ddd;text-align: center" v-if="pic">-->
          <!--<Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>-->
          <!--<p>Click files here to upload</p>-->
          <!--</div>-->
          <!--<div><img :src="img1.jpg" alt="首焦图" v-if="!pic" style="padding: 20px 0;width:430px;border:1px dashed #ddd;"></div>-->
          <!--</Upload>-->
          <div class="demo-upload-list" v-for="item in uploadList1">
            <!--<template v-if="item.status === 'finished'">-->
              <img :src="item.fileUrl">
              <div class="demo-upload-list-cover">
                <icon type="ios-eye-outline" @click.native="handleView1(item)"></icon>
                <icon type="ios-trash-outline" @click.native="handleRemove1(item)"></icon>
              </div>
            <!--</template>-->
            <!--<template v-else>-->
              <!--<i-progress v-if="item.showProgress" :percent="item.percentage" hide-info></i-progress>-->
            <!--</template>-->
          </div>
          <upload
            ref="upload1"
            :show-upload-list="false"
            :default-file-list="defaultList"
            :on-success="handleSuccess1"

            multiple
            type="drag"
            action="https://wx.ailabcare.com/clinicalmall-web/hospital/uploadHospital"
            style="display: inline-block;width:58px;">
            <div style="width: 58px;height:58px;line-height: 58px;">
              <icon type="camera" size="20"></icon>
            </div>
          </upload>
          </Col>
        </Row>
      </Modal>

      <Modal
        v-model="doctor"
        @on-ok="doctorok"
        width="600" >
        <!--<Transfer-->
          <!--:data="doctorData"-->
          <!--:target-keys="doctorData2"-->
          <!--filterable-->
          <!--:filter-method="filterMethod"-->
          <!--@on-change="doctorChange" :titles="doctorRole"></Transfer>-->
        <p slot="header">
          <span>添加医生({{addDoctor.hospitalName}})</span>
        </p>
          <Row>
              <Col span="3" style="text-align: center;line-height:32px">选择科室：</Col>
              <Col span="21">
                <Select  style="width:100%" v-model="addDoctor.offices" placeholder="选择科室">
                  <Option v-for="l in hasOffices"  :value="l.dataCode" :key="l.id">{{l.dataName}}</Option>
                </Select>
              </Col>
          </Row>
          <Row style="margin-top: 10px">
            <Col span="3" style="text-align: center;line-height:32px">医生姓名：</Col>   <Col span="9"><Input v-model="addDoctor.doctorName"  placeholder="医生姓名"></Input></Col>
            <Col span="3" style="text-align: center;line-height:32px">医生电话：</Col>   <Col span="9"><Input v-model="addDoctor.doctorPhone"  placeholder="医生电话"></Input></Col>
          </Row>
          <Row style="margin-top: 10px">
            <Col span="12" offset="6"> <Button type="success" @click="addDoctorForHospital" long >添加</Button></Col>
          </Row>
          <Table :data="doctorList" :columns="doctorLoums" stripe :loading="doctorLoading"  style="margin-top: 10px"></Table>
      </Modal>

      <!--<Modal-->
        <!--v-model="doctorTips"-->
        <!--title="提示"-->
        <!--@on-ok="doctorTipsOk"-->
        <!--@on-cancel="cancel('您取消了角色分配')">-->
        <!--<p><Icon type="information-circled" color="blue" size="24" style="margin-right: 10px"></Icon>确定为{{doctorMsg.name}}分配医生？</p>-->

      <!--</Modal>-->


      <Modal
        v-model="nurse"
        title="分配护士"
        @on-ok="nurseok"
        @on-cancel="cancel('您取消了护士分配')" width="600" >
        <Transfer
          :data="nurseData"
          :target-keys="nurseData2"
          filterable
          :filter-method="filterMethod"
          @on-change="nurseChange" :titles="nurseRole"></Transfer>
      </Modal>

      <Modal
        v-model="nurseTips"
        title="提示"
        @on-ok="nurseTipsOk"
        @on-cancel="cancel('您取消了角色分配')">
        <p><Icon type="information-circled" color="blue" size="24" style="margin-right: 10px"></Icon>确定为{{nurseMsg.name}}分配护士？</p>

      </Modal>

      <Modal
        v-model="logistics"
        title="分配物流"
        @on-ok="logisticsok"
        @on-cancel="cancel('您取消了物流分配')" width="600" >
        <Transfer
          :data="logisticsData"
          :target-keys="logisticsData2"
          filterable
          :filter-method="filterMethod"
          @on-change="logisticsChange" :titles="logisticsRole"></Transfer>
      </Modal>

      <Modal
        v-model="logisticsTips"
        title="提示"
        @on-ok="logisticsTipsOk"
        @on-cancel="cancel('您取消了角色分配')">
        <p><Icon type="information-circled" color="blue" size="24" style="margin-right: 10px"></Icon>确定为{{logisticsMsg.name}}分配物流人员？</p>

      </Modal>

      <modal title="查看图片" v-model="visible">
        <img :src="imgName" v-if="visible" style="width: 100%">
      </modal>

      <Modal v-model="isShow">
        <div v-for="item in imgList">
          <img :src="item.fileUrl" alt="附件图片"  style="width: 100%">
        </div>
      </Modal>

      <Modal
        v-model="saleModal"
        title="添加销售"
       width="600" >
        <p slot="header">
          <span>添加销售({{saleMan.hospitalName}})</span>
        </p>
        <Row>
          <Col span="3" style="text-align: center;line-height:32px">选择科室：</Col>
          <Col span="9">
            <Select  style="width:100%" v-model="saleMan.offices" placeholder="选择科室" @on-change="officeChange">
              <Option v-for="l in hasOffices"  :value="l.dataCode" :key="l.id">{{l.dataName}}</Option>
            </Select>
          </Col>
          <Col span="3" style="text-align: center;line-height:32px">选择医生：</Col>
          <Col span="9">
            <Select  style="width:100%" v-model="saleMan.doctor" placeholder="选择医生" filterable>
              <Option v-for="l in doctorByOffice"  :value="l.id" :key="l.id">{{l.userName}}</Option>
            </Select>
          </Col>
        </Row>
        <Row style="margin-top: 10px">
          <Col span="3" style="text-align: center;line-height:32px">选择销售：</Col>
          <Col span="9">
            <Select  style="width:100%" v-model="saleMan.sale" placeholder="选择销售" filterable>
              <Option v-for="l in allSale"  :value="l.id" :key="l.id">{{l.userName}}</Option>
            </Select>
          </Col>
          <Col span="10" offset="1"><Button type="success" @click="addSale" long >添加</Button></Col>
        </Row>
        <Table :data="saleList" :columns="saleLoums" stripe  style="margin-top: 10px"></Table>
      </Modal>

    </div>
</template>
<script type="text/ecmascript-6">
  import axios from "axios"
  import {dicType,getDoctorByHospital,addDoctor,delDoctor,qs,getDoctor,getAllSale,saveSale,getSaleByHospital} from "./../../api/common"
    export default {
        data() {
            return {
              saleModal:false,
              doctorByOffice:[],
              allSale:[],
              saleList:[],
              saleLoums:[
                {
                  title: '科室',
                  key: 'subjectName',
                  width:200,
                  align:"center"
                },
                //doctorName
                {
                  title: '医生',
                  key: 'doctorName',
                  width:200,
                  align:"center"
                },
                {
                  title: '销售',
                  key: 'saleName',
                  align:"center"
                }
              ],
              saleMan:{
                hospitalName:"",
                offices:"",
                hospitalId:"",
                doctor:"",
                sale:""
              },
              hasOffices:[],//已开的科室
              addDoctor: {
                hospitalName:"",
                offices: "",
                hospitalId:"",
                doctorName:"",
                doctorPhone:""
              },
              doctorLoading:false,
              doctorList:[],//医院医生列表
              doctorLoums:[
                {
                  title: '科室',
                  key: 'subjectName',
                  width:120,
                  align:"center"
                },
                {
                  title: '医生姓名',
                  key: 'userName',
                  width:100,
                  align:"center"
                },
                {
                  title: '医生条码',
                  key: 'barCode',
                  width:150,
                  align:"center"
                },
                {
                  title: '手机号',
                  key: 'phone',
                  width:120,
                  align:"center"
                },
                {
                  title: '操作',
                  width:80,
                  align:"center",
                  fixed:'right',
                  render: (h, params)=>{
                    return h('div',[
                      h("Button",{
                        props: {
                          type: 'error',
                          size: 'small'
                        },

                        on:{
                          click:()=>{
                            let _this = this;
                            _this.$Modal.confirm({
                              title:'删除',
                              content:'确定要删除么？',
                              okText:'删除',
                              onOk:function () {
                                let param = qs.stringify({
                                  hospitalId:_this.addDoctor.hospitalId,
                                  userId:params.row.id
                                })
                                delDoctor(param).then((result)=>{
                                  console.log(result)
                                  if(result.code == '000000'){
                                    _this.$Notice.success({title:"删除成功"});
                                    _this.getDoctorList();
                                  }else{
                                    _this.$Notice.error({title:result.msg});
                                  }
                                })
                              }
                            })
                          }
                        }
                      },"删除")
                    ])
                  }
                },
              ],//
              imgList:[],//图片附件列表
              isShow:false,
              defaultList: [

              ],
              imgName: '',
              visible: false,
              uploadList: [],
              uploadList1:[],
              formInline:{
                hospitalName:"",
                hospitalCode:"",
                pinyinName:"",
                provinceCd:"",
                cityCd:"",
                areaCd:"",
                level:"",
                samplingLocation:"",
                reportTitle:"",
                reportDelivery:"",
                validFlag:""
              },
              page:1,
              pageSize:10,
              placement:"bottom",
              pic:true,
              provinceArr:[],//省
              cityArr:[],
              areaArr:[],
              hospitalLevel:[],//医院等级
              hospitalReportTitle:[],//报告抬头
              hospitalReportDelivery:[],//报告配送方式
              testCenter:[],//检验中心
              tableData:[],
              loading:true,
              total:0,
              doctor:false,//分配医生模态框
              doctorMsg:{
                id:"",//医院id
                name:""//医院名称
              },//分配医生信息
              nurse:false,//分配护士模态
              nurseData:[],
              nurseData2:[],
              nurseRole:["未分配护士","已分配护士"],
              nurseTips:false,
              nurseMsg:{
                id:"",
                name:""
              },
              logistics:false,//分配物流模态
              logisticsData:[],
              logisticsData2:[],
              logisticsRole:["未分配物流人员","已分配物流人员"],
              logisticsTips:false,
              logisticsMsg:{
                id:"",
                name:""
              },
              cloums:[
                {
                  title: '医院代码',
                  key: 'hospitalCode',
                  width:120,
                  align:"center"
                },
                {
                  title: '医院名称',
                  key: 'hospitalName',
                  width:220,
                  align:"left"
                },
                {
                  title: '医院拼音简写',
                  key: 'pinyinName',
                  width:220,
                  align:"center"
                },
                {
                  title: '省',
                  key: 'provinceName',
                  width:120,
                  align:"center"
                },
                {
                  title: '市',
                  key: 'cityName',
                  width:120,
                  align:"center"
                },
                {
                  title: '区',
                  key: 'areaName',
                  width:120,
                  align:"center"
                },
                {
                  title: '详细地址',
                  key: 'dtlAddress',
                  width:280,
                  align:"center"
                },
                {
                  title: '医院等级',
                  key: 'level',
                  width:120,
                  align:"center"
                },
                {
                  title: '法人代表',
                  key: 'legalPerson',
                  width:120,
                  align:"center"
                },
                {
                  title: '诊所联系电话',
                  key: 'hospitalTel',
                  width:150,
                  align:"center"
                },
                {
                  title: '负责人姓名',
                  key: 'hospitalMaster',
                  width:150,
                  align:"center"
                },
                {
                  title: '负责人电话',
                  key: 'masterTel',
                  width:150,
                  align:"center"
                },
                {
                  title: '法人名称',
                  key: 'legalPersonName',
                  width:120,
                  align:"center"
                },
                {
                  title: '法人资质证明编号',
                  key: 'legalPersonSN',
                  width:160,
                  align:"center"
                },
                {
                  title: '所有制性质',
                  key: 'hospitalProperties',
                  width:130,
                  align:"center"
                },
                {
                  title: '所有制形式',
                  key: 'hospitalMode',
                  width:130,
                  align:"center"
                },
                {
                  title: '开设科室',
                  key: 'hospitalOffices',
                  width:180,
                  align:"center"
                },
                {
                  title: '开设科室其他',
                  key: 'hospitalOfficesOther',
                  width:150,
                  align:"center"
                },
                {
                  title: '服务规模',
                  key: 'hospitalServiceNum',
                  width:120,
                  align:"center"
                },
                {
                  title: '门诊量',
                  key: 'hospitalPatientNum',
                  width:120,
                  align:"center"
                },
                {
                  title: 'HIS厂商',
                  key: 'hospitalHIS',
                  width:120,
                  align:"center"
                },
                {
                  title: 'LIS厂商',
                  key: 'hospitalLIS',
                  width:120,
                  align:"center"
                },
                {
                  title: '是否开展检验',
                  key: 'hospitalTest',
                  width:150,
                  align:"center"
                },
                {
                  title: '结算方式',
                  key: 'settlementMode',
                  width:120,
                  align:"center"
                },
                {
                  title: '医生需求',
                  key: 'doctorDemand',
                  width:150,
                  align:"center"
                },
                {
                  title: '是否采样点',
                  key: 'samplingLocation',
                  width:120,
                  align:"center"
                },
                {
                  title: '报告抬头',
                  key: 'reportTitle',
                  width:120,
                  align:"center"
                },
                {
                  title: '报告配送方式',
                  key: 'reportDelivery',
                  width:150,
                  align:"center"
                },
                {
                  title: '检验中心',
                  key: 'testCenterName',
                  width:350,
                  align:"center"
                },
                {
                  title: '是否有效',
                  key: 'validFlag',
                  width:100,
                  align:"center"
                },
                {
                  title: '填写人',
                  key: 'writeUser',
                  width:120,
                  align:"center"
                },
                {
                  title: '填写时间',
                  key: 'writeTime',
                  width:150,
                  align:"center"
                },
                {
                  title: '填写人电话',
                  key: 'writeUserTel',
                  width:150,
                  align:"center"
                },
                {
                  title: '检验项目其他需求',
                  key: 'projectDemand',
                  width:180,
                  align:"center"
                },
                {
                  title: '创建人',
                  key: 'creator',
                  width:80,
                  align:"center"
                },
                {
                  title: '修改人',
                  key: 'updater',
                  width:80,
                  align:"center"
                },
                {
                  title: '操作',
                  fixed: "right",
                  width:425,
                  align:"center",
                  render: (h, params)=>{
                    return h("div",[
                      h("Button",{
                        props: {
                          type: 'primary',
                          size: 'small'
                        },
                        style: {
                          marginRight: '5px'
                        },
                        on:{
                          click:()=>{
//                            console.log(params.row)
                              this.edit = true;
                            var qs = require("qs");
                            var param = qs.stringify({
                              hospitalId:params.row.id
                            });
                            axios.post("hospital/getHospitalById",param).then((res)=>{
                              console.log(res)
                              if(res.data.code == "000000"){
                                let hospital = res.data.data.hospital;
                                  this.editForm.hospitalName = hospital.hospitalName;
                                  this.editForm.pinyinName = hospital.pinyinName;
                                  this.editForm.provinceCd = hospital.provinceCd;
                                  this.editForm.cityCd = hospital.cityCd;
                                  this.editForm.areaCd = hospital.areaCd;
                                  this.editForm.level = hospital.level;
//                                  for(var i=0;i<this.hospitalLevel.length;i++){
//                                    if(hospital.level == this.hospitalLevel[i].dataName){
//                                      this.editForm.level = this.hospitalLevel[i].dataCode;
//                                    }
//                                  }
                                  this.editForm.dtlAddress = hospital.dtlAddress;
                                  this.editForm.reportTitle = hospital.reportTitle;
//                                  for(var i=0;i<this.hospitalReportTitle.length;i++){
//                                    if(hospital.reportTitle == this.hospitalReportTitle[i].dataName){
//                                      this.editForm.reportTitle = this.hospitalReportTitle[i].dataCode;
//                                    }
//                                  }

                                this.editForm.reportDelivery = hospital.reportDelivery;
                                  this.editForm.validFlag = hospital.validFlag;
                                  this.editForm.testCenterId = hospital.testCenterId;
                                  this.editForm.samplingLocation = hospital.samplingLocation;
                                  this.editForm.id = hospital.id;
                                  this.editForm.hospitalCode = hospital.hospitalCode;
                                  this.editForm.legalPerson = hospital.legalPerson;//法人代表
                                  this.editForm.hospitalTel = hospital.hospitalTel;
                                  this.editForm.hospitalMaster = hospital.hospitalMaster;
                                  this.editForm.masterTel = hospital.masterTel;
                                  this.editForm.legalPersonName = hospital.legalPersonName;
                                  this.editForm.legalPersonSN = hospital.legalPersonSN;
                                  this.editForm.hospitalProperties = hospital.hospitalProperties;
                                  this.editForm.hospitalMode = hospital.hospitalMode;
                                  if(hospital.hospitalOffices){
                                    if(hospital.hospitalOffices.indexOf(",")>-1){
                                      this.editForm.hospitalOffices = hospital.hospitalOffices.split(",");
                                    }else{
                                      this.editForm.hospitalOffices = [hospital.hospitalOffices];
                                    }
                                  }
                                  this.editForm.hospitalOfficesOther = hospital.hospitalOfficesOther;
                                  this.editForm.hospitalOfficesNum = hospital.hospitalOfficesNum;
                                  this.editForm.hospitalServiceNum = hospital.hospitalServiceNum;
                                  this.editForm.hospitalPatientNum = hospital.hospitalPatientNum;
                                  this.editForm.hospitalHIS = hospital.hospitalHIS;
                                  this.editForm.hospitalLIS = hospital.hospitalLIS;
                                  this.editForm.hospitalTest = hospital.hospitalTest;
                                  this.editForm.settlementMode = hospital.settlementMode;
                                  this.editForm.doctorDemand = hospital.doctorDemand;
                                  this.editForm.writeUser = hospital.writeUser;
                                  this.editForm.writeUserTel = hospital.writeUserTel;
                                  this.editForm.writeTime = hospital.writeTime;
                                  this.editForm.projectDemand = hospital.projectDemand;
                                  this.uploadList1 = res.data.data.sysFileList;
                                  console.log(this.uploadList1)
                              }else{
                                this.$Notice.error({
                                  title:res.data.msg
                                })
                              }
                            })
                          }
                        }
                      },"编辑"),
                      // h("Button",{
                      //   props: {
                      //     type: 'primary',
                      //     size: 'small'
                      //   },
                      //   style: {
                      //     marginRight: '5px'
                      //   },
                      //   on:{
                      //     click:()=>{
                      //         var qs = require("qs");
                      //         var param = qs.stringify({
                      //           hospitalId:params.row.id
                      //         });
                      //         this.project = true;
                      //       this.projectMsg.id = params.row.id;
                      //       this.projectMsg.name = params.row.hospitalName;
                      //         axios.post("hospital/selectHospitalProject",param).then((res)=>{
                      //             console.log(res.data.data.allProject)
                      //           if(res.data.code =="000000"){
                      //             this.projectData = [];
                      //             var len = res.data.data.allProject;
                      //             for(let i=0;i<len.length;i++){
                      //               this.projectData.push({
                      //                 key:len[i].id,
                      //                 label:len[i].chinaName
                      //               })
                      //             }
                      //             this.projectData2 = [];
                      //             for(let i=0;i<res.data.data.hospitalProject.length;i++){
                      //               this.projectData2.push(res.data.data.hospitalProject[i].id);
                      //             }
                      //           }else{
                      //             this.$Notice.error({title:res.data.msg})
                      //           }
                      //         })
                      //     }
                      //   }
                      // },"检验项目"),
                      h("Button",{
                        props: {
                          type: 'error',
                          size: 'small'
                        },
                        style: {
                          marginRight: '5px'
                        },
                        on:{
                          click:()=>{
                            console.log(params.row);
                            this.addDoctor.hospitalName =  params.row.hospitalName;
                            if(params.row.hospitalOffices==""){
                              this.$Modal.info({
                                title: "还没有添加科室",
                                content: "请先添加科室"
                              });
                              return false;
                            }
                            this.doctor = true;
                            let hospitalOffices = params.row.hospitalOffices.split(",");//科室

                            let hasOffices = this.hospitalOffices.filter(function (item) {
                              for (let i in hospitalOffices){
                                if(item.dataName == hospitalOffices[i] ){
                                  return item;
                                }
                              }
                            })//科室字典
                            this.hasOffices = hasOffices;

                            this.addDoctor.hospitalId = params.row.id;//医院id
                            this.getDoctorList();


                          }
                        }
                      },"添加医生"),
                      h("Button",{
                        props: {
                          type: 'error',
                          size: 'small'
                        },
                        style: {
                          marginRight: '5px'
                        },
                        on:{
                          click:()=>{
                            this.nurseMsg.id = params.row.id;
                            this.nurseMsg.name = params.row.hospitalName;
                            var qs = require("qs");

                            var param = qs.stringify({
                              hospitalId:params.row.id
                            });

                            axios.post("/hospital/selectallotNurseToBusHospitalList",param).then((res)=>{
                              if(res.data.code == "000000"){
                                this.nurse = true;
                                this.nurseData = [];
                                for(let i=0;i<res.data.data.doctorUserList.length;i++){
                                  this.nurseData.push({
                                    key:res.data.data.doctorUserList[i].id,
                                    label:res.data.data.doctorUserList[i].userName
                                  })
                                }
                                this.nurseData2 = [];
                                for(let i=0;i<res.data.data.doctorUserHospitalList.length;i++){
//                                  this.nurseData.push({
//                                    key:res.data.data.doctorUserHospitalList[i].id,
//                                    label:res.data.data.doctorUserHospitalList[i].userName
//                                  })
                                  this.nurseData2.push(res.data.data.doctorUserHospitalList[i].id);
                                }
                              }else{
                                this.$Notice.error({title:res.data.msg})
                              }
                            })
                          }
                        }
                      },"分配护士"),
                      h("Button",{
                        props: {
                          type: 'error',
                          size: 'small'
                        },
                        style: {
                          marginRight: '5px'
                        },
                        on:{
                          click:()=>{
                            console.log(params.row)
                            this.logisticsMsg.id = params.row.id;
                            this.logisticsMsg.name = params.row.hospitalName;
                            var qs = require("qs");

                            var param = qs.stringify({
                              hospitalId:params.row.id
                            });

                            axios.post("/hospital/selectallotCourierToBusHospitalList",param).then((res)=>{
                              if(res.data.code == "000000"){
                                this.logistics = true;
                                this.logisticsData = [];
                                for(let i=0;i<res.data.data.doctorUserList.length;i++){
                                  this.logisticsData.push({
                                    key:res.data.data.doctorUserList[i].id,
                                    label:res.data.data.doctorUserList[i].userName
                                  })
                                }
                                this.logisticsData2 = [];
                                for(let i=0;i<res.data.data.doctorUserHospitalList.length;i++){
//                                  this.logisticsData.push({
//                                    key:res.data.data.doctorUserHospitalList[i].id,
//                                    label:res.data.data.doctorUserHospitalList[i].userName
//                                  })
                                  this.logisticsData2.push(res.data.data.doctorUserHospitalList[i].id);
                                }
                              }else{
                                this.$Notice.error({title:res.data.msg})
                              }
                            })
                          }
                        }
                      },"分配物流"),
                      h("Button",{
                        props:{
                          type:'error',
                          size:'small'
                        },
                        style:{
                          marginRight:'5px'
                        },
                        on:{
                          click:()=>{
                            console.log(params.row)
                            this.saleModal = true;
                            this.saleMan.hospitalName = params.row.hospitalName;
                            let hospitalOffices = params.row.hospitalOffices.split(",");//科室

                            let hasOffices = this.hospitalOffices.filter(function (item) {
                              for (let i in hospitalOffices){
                                if(item.dataName == hospitalOffices[i] ){
                                  return item;
                                }
                              }
                            })//科室字典
                            this.hasOffices = hasOffices;

                            this.saleMan.hospitalId = params.row.id;//医院id
                            this.getAllSaleByoffice();
                          }
                        }
                      },"分配销售"),
                      h("Button",{
                        props: {
                          type: 'info',
                          size: 'small'
                        },
                        on:{
                          click:()=>{
                            var qs = require("qs");
                            var param = qs.stringify({
                              hospitalId:params.row.id
                            });
                            axios.post("hospital/getHospitalById",param).then((res)=>{
                              console.log(res.data.data.sysFileList)
                              if(res.data.code == "000000"){

                                  if(res.data.data.length!=0){
                                    this.isShow = true;
                                    this.imgList = res.data.data.sysFileList;
                                    console.log(this.imgList)
                                  }else{
                                    this.$Notice.info({title:"暂无数据"})
                                  }

                              }else{
                                this.$Notice.error(res.data.msg)
                              }
                            })
                          }
                        }
                      },"查看附件")
                    ])
                  }
                }
              ],

              add:false,
              addForm:{
                hospitalName:"",
                pinyinName:"",
                provinceCd:"",
                cityCd:"",
                areaCd:"",
                level:"",
                dtlAddress:"",
                reportTitle:"",
                reportDelivery:"",
                validFlag:"",
                testCenterId:"",
                legalPerson:"",//法人代表
                hospitalTel:"",
                hospitalMaster:"",
                masterTel:"",
                legalPersonName:"",
                legalPersonSN:"",
                hospitalProperties:"",
                hospitalMode:"",
                hospitalOffices:[],
                hospitalOfficesOther:"",
                hospitalOfficesNum:"",
                hospitalServiceNum:"",
                hospitalPatientNum:"",
                hospitalHIS:"",
                hospitalLIS:"",
                hospitalTest:"",
                settlementMode:"",
                doctorDemand:"",
                writeUser:"",
                writeUserTel:"",
                writeTime:"",
                projectDemand:"",
              },
              fileLists:[],//附件列表
              edit:false,
              editForm:{
                hospitalName:"",
                pinyinName:"",
                provinceCd:"",
                cityCd:"",
                areaCd:"",
                level:"",
                dtlAddress:"",
                reportTitle:"",
                reportDelivery:"",
                validFlag:"",
                testCenterId:"",
                samplingLocation:"",
                id:"",
                hospitalCode:"",
                legalPerson:"",//法人代表
                hospitalTel:"",
                hospitalMaster:"",
                masterTel:"",
                legalPersonName:"",
                legalPersonSN:"",
                hospitalProperties:"",
                hospitalMode:"",
                hospitalOffices:[],
                hospitalOfficesOther:"",
                hospitalOfficesNum:"",
                hospitalServiceNum:"",
                hospitalPatientNum:"",
                hospitalHIS:"",
                hospitalLIS:"",
                hospitalTest:"",
                settlementMode:"",
                doctorDemand:"",
                writeUser:"",
                writeUserTel:"",
                writeTime:"",
                projectDemand:"",
              },
              settlementMode:[],//结算方式
              hospitalTest:[],//是否开展检验
              hospitalServiceNum:[],//服务规模
              hospitalProperties:[],//所有制性质
              hospitalOffices:[],//开设科室
              hospitalMode:[]//所有制形式
            }
        },
      mounted(){
          this.getInfo();
          this.init();
          this.uploadList = this.$refs.upload.fileList;
//          this.uploadList1 = this.$refs.upload1.fileList;
      },
      methods:{
        getInfo(){
          let _this = this;
          getAllSale().then(result=>{
            if(result.code == '000000'){
              _this.allSale = result.data;
            }else{
              _this.$Notice.error({title:result.msg})
            }
          })
          axios.post("/testCenter/queryBusTestcenterListByValid").then((res)=>{
            if(res.data.code == "000000"){
              _this.testCenter = res.data.data;
            }else{
              _this.$Notice.error({title:res.data.msg})
            }
          });
            axios.post("/common/provinceList").then((res)=>{
                if(res.data.code == "000000"){
                  _this.provinceArr = res.data.data;
                }else{
                  _this.$Notice.error({title:res.data.msg})
                }
            });
            let param = qs.stringify({
              dictType:"hospital_level"
            });
          dicType(param).then((res)=>{
              if(res.code == "000000"){
                _this.hospitalLevel = res.data;
              }else{
                _this.$Notice.error({title:res.msg})
              }
            });
            let param1 = qs.stringify({
              dictType:"hospital_reportTitle"
            });
          dicType(param1).then((res)=>{
              if(res.code == "000000"){
                _this.hospitalReportTitle = res.data;
              }else{
                _this.$Notice.error({title:res.msg})
              }
            });
          let param2 = qs.stringify({
              dictType:"hospital_reportDelivery"
            });
          dicType(param2).then((res)=>{
              if(res.code == "000000"){
                _this.hospitalReportDelivery = res.data;
              }else{
                _this.$Notice.error({title:res.msg})
              }
            });
            //结算方式
          let param3 = qs.stringify({
            dictType:"settlement_mode"
          });
          dicType(param3).then((res)=>{
            if(res.code == "000000"){
              _this.settlementMode = res.data;
            }else{
              _this.$Notice.error({title:res.msg})
            }
          });
          //是否开展检验
          let param4 = qs.stringify({
            dictType:"hospital_test"
          });
          dicType(param4).then((res)=>{
            if(res.code == "000000"){
              _this.hospitalTest = res.data;
            }else{
              _this.$Notice.error({title:res.msg})
            }
          });

          //服务规模
          let param5 = qs.stringify({
            dictType:"hospital_service_Num"
          });
          dicType(param5).then((res)=>{
            if(res.code == "000000"){
              _this.hospitalServiceNum = res.data;
            }else{
              _this.$Notice.error({title:res.msg})
            }
          });

          //所有制性质
          let param6 = qs.stringify({
            dictType:"hospital_Properties"
          });
          dicType(param6).then((res)=>{
            if(res.code == "000000"){
              _this.hospitalProperties = res.data;
            }else{
              _this.$Notice.error({title:res.msg})
            }
          });

          //开设科室
          let param7 = qs.stringify({
            dictType:"hospital_offices"
          });
          dicType(param7).then((res)=>{
            if(res.code == "000000"){
              _this.hospitalOffices = res.data;
            }else{
              _this.$Notice.error({title:res.msg})
            }
          });
          //所有制形式
          let param8 = qs.stringify({
            dictType:"hospital_Mode"
          });
          dicType(param8).then((res)=>{
            if(res.code == "000000"){
              _this.hospitalMode = res.data;
            }else{
              _this.$Notice.error({title:res.msg})
            }
          });

        },
        init(){

          let param = qs.stringify({
            page:this.page,
            pageSize:this.pageSize,
            hospitalName:this.formInline.hospitalName,
            hospitalCode:this.formInline.hospitalCode,
            pinyinName:this.formInline.pinyinName,
            provinceCd:this.formInline.provinceCd,
            cityCd:this.formInline.cityCd,
            areaCd:this.formInline.areaCd,
            level:this.formInline.level,
            samplingLocation:this.formInline.samplingLocation,
            validFlag:this.formInline.validFlag,
            reportTitle:this.formInline.reportTitle,
            reportDelivery:this.formInline.reportDelivery
          });
          axios.post("/hospital/queryBusHospitalListByPage",param).then((res)=>{
            if(res.data.code == "000000"){
                this.total = res.data.count;
                this.loading = false;
                for(let i=0;i<res.data.data.length;i++){
                  res.data.data[i].samplingLocation = res.data.data[i].samplingLocation=="1"?"是":"否";
                  res.data.data[i].validFlag = res.data.data[i].validFlag=="1"?"是":"否";
                  for(let j=0;j<this.hospitalLevel.length;j++){
                    if(res.data.data[i].level == this.hospitalLevel[j].dataCode){
                      res.data.data[i].level = this.hospitalLevel[j].dataName;
                    }
                  }

                  for(var k=0;k<this.hospitalReportTitle.length;k++){
                    if(res.data.data[i].reportTitle == this.hospitalReportTitle[k].dataCode){
                      res.data.data[i].reportTitle = this.hospitalReportTitle[k].dataName;
                    }
                  }

                  for(var l=0;l<this.hospitalReportDelivery.length;l++){
                    if(res.data.data[i].reportDelivery == this.hospitalReportDelivery[l].dataCode){
                      res.data.data[i].reportDelivery = this.hospitalReportDelivery[l].dataName;
                    }
                  }

                  for(let l=0;l<this.hospitalProperties.length;l++){
                    if(res.data.data[i].hospitalProperties == this.hospitalProperties[l].dataCode){
                      res.data.data[i].hospitalProperties = this.hospitalProperties[l].dataName;
                    }
                  }

                  for(let l=0;l<this.hospitalMode.length;l++){
                    if(res.data.data[i].hospitalMode == this.hospitalMode[l].dataCode){
                      res.data.data[i].hospitalMode = this.hospitalMode[l].dataName;
                    }
                  }
                  //特殊处理（开设科室）
                  let s;
                  if(res.data.data[i].hospitalOffices){
                    if(res.data.data[i].hospitalOffices.indexOf(",")>-1){
                      s = res.data.data[i].hospitalOffices.split(",");
                    }else{
                      s=[];
                      s.push(res.data.data[i].hospitalOffices);
                    }


                    let a = [];
                    for(let m=0;m<s.length;m++){
                      for(let l=0;l<this.hospitalOffices.length;l++){
                        if(s[m] == this.hospitalOffices[l].dataCode){
                          a.push(this.hospitalOffices[l].dataName)
                        }
                      }
                    }
                    res.data.data[i].hospitalOffices = a.join(",");
                  }

//                  console.log(s)
//                  console.log(a)

//                  for(let l=0;l<this.hospitalOffices.length;l++){
//                    if(res.data.data[i].hospitalOffices == this.hospitalOffices[l].dataCode){
//                      res.data.data[i].hospitalOffices = this.hospitalOffices[l].dataName;
//                    }
//                  }

                  for(let l=0;l<this.hospitalServiceNum.length;l++){
                    if(res.data.data[i].hospitalServiceNum == this.hospitalServiceNum[l].dataCode){
                      res.data.data[i].hospitalServiceNum = this.hospitalServiceNum[l].dataName;
                    }
                  }

                  for(let l=0;l<this.hospitalTest.length;l++){
                    if(res.data.data[i].hospitalTest == this.hospitalTest[l].dataCode){
                      res.data.data[i].hospitalTest = this.hospitalTest[l].dataName;
                    }
                  }

                  for(let l=0;l<this.settlementMode.length;l++){
                    if(res.data.data[i].settlementMode == this.settlementMode[l].dataCode){
                      res.data.data[i].settlementMode = this.settlementMode[l].dataName;
                    }
                  }
                }
                this.tableData = res.data.data;
            }else{
              this.$Notice.error({title:res.data.msg})
            }
          })
        },
        onSubmit(){
          this.init();
        },
        resetForm(){
            this.formInline.hospitalName = "";
            this.formInline.hospitalCode = "";
            this.formInline.pinyinName = "";
            this.formInline.provinceCd = "";
            this.formInline.cityCd = "";
            this.formInline.areaCd = "";
            this.formInline.level = "";
            this.formInline.samplingLocation = "";
            this.formInline.reportTitle = "";
            this.formInline.reportDelivery = "";
            this.formInline.validFlag = "";
            this.page = 1;
            this.pageSize = 10;
            this.init();
        },
        onAdd(){
          this.add = true;
        },
        changePage(page){
          this.page = page;
          this.loading = true;
          this.init();
        },
        changeSize(size){
          this.placement = size>=20?"top":"bottom";
          this.pageSize = size;
          this.loading = true;
          this.init();
        },
        //科室改变时 加载医生
        officeChange(office){
          //console.log(office)doctorByOffice
          let _this = this;
          if(office){
                let param = qs.stringify({
                  hospitalId:_this.saleMan.hospitalId,
                  subjectId:office
                })
                getDoctor(param).then(result=>{
                  console.log(result)
                  if(result.code == '000000'){
                    _this.doctorByOffice = result.data;
                  }else{
                    _this.$Notice.error({title:result.msg})
                  }
                })
          }
        },
        getAllSaleByoffice(){
          let _this = this;
          let param = qs.stringify({
            hospitalId:_this.saleMan.hospitalId
          });
          getSaleByHospital(param).then(result =>{
            if(result.code == '000000'){
              _this.saleList = result.data;
            }else{
              _this.$Notice.error({title:result.msg})
            }
          })
        },
        addSale(){
          let _this = this;
          let param = qs.stringify({
            hospitalId:_this.saleMan.hospitalId,
            subjectId:_this.saleMan.offices,
            userId:_this.saleMan.sale,
            doctorId:_this.saleMan.doctor
          });
          saveSale(param).then(result =>{
            if(result.code == '000000'){
              _this.$Notice.success({title:'添加成功'});
              _this.getAllSaleByoffice();
            }else{
              _this.$Notice.error({title:result.msg});
            }
          })
        },
        //省份改变时
        pchange(p){

         if(p){
           var qs = require("qs");
           var param = qs.stringify({
             regionCode:p
           })
           axios.post("/common/regionListByRegionCode",param).then((res)=>{
             if(res.data.code =="000000"){
               this.cityArr = res.data.data;
             }else{
               this.$Notice.error({title:res.data.msg})
             }
           });
         }
        },
        //市改变时
        schange(s){
          if(s){
            var qs = require("qs");
            var param = qs.stringify({
              regionCode:s
            })
            axios.post("/common/regionListByRegionCode",param).then((res)=>{
              if(res.data.code =="000000"){
                this.areaArr = res.data.data;
              }else{
                this.$Notice.error({title:res.data.msg})
              }
            });
          }
        },
        cancel (msg) {
          this.$Notice.info({title:msg});
        },
        addok(){
            var qs = require("qs");
            var list = [];
            console.log(this.uploadList)
            for(let i=0;i<this.uploadList.length;i++){
              list.push(this.uploadList[i].response.data.id)
            }
            var param = qs.stringify({
              hospitalName:this.addForm.hospitalName,
              pinyinName:this.addForm.pinyinName,
              provinceCd:this.addForm.provinceCd,
              cityCd:this.addForm.cityCd,
              areaCd:this.addForm.areaCd,
              level:this.addForm.level,
              validFlag:this.addForm.validFlag,
              reportTitle:this.addForm.reportTitle,
              reportDelivery:this.addForm.reportDelivery,
              dtlAddress:this.addForm.dtlAddress,
              testCenterId:this.addForm.testCenterId,
              legalPerson:this.addForm.legalPerson,//法人代表
              hospitalTel:this.addForm.hospitalTel,
              hospitalMaster:this.addForm.hospitalMaster,
              masterTel:this.addForm.masterTel,
              legalPersonName:this.addForm.legalPersonName,
              legalPersonSN:this.addForm.legalPersonSN,
              hospitalProperties:this.addForm.hospitalProperties,
              hospitalMode:this.addForm.hospitalMode,
              hospitalOffices:this.addForm.hospitalOffices.join(","),
              hospitalOfficesOther:this.addForm.hospitalOfficesOther,
              hospitalOfficesNumStr:this.addForm.hospitalOfficesNum,
              hospitalServiceNum:this.addForm.hospitalServiceNum,
              hospitalPatientNum:this.addForm.hospitalPatientNum,
              hospitalHIS:this.addForm.hospitalHIS,
              hospitalLIS:this.addForm.hospitalLIS,
              hospitalTest:this.addForm.hospitalTest,
              settlementMode:this.addForm.settlementMode,
              doctorDemand:this.addForm.doctorDemand,
              writeUser:this.addForm.writeUser,
              writeUserTel:this.addForm.writeUserTel,
              writeTimeStr:this.addForm.writeTime,
              projectDemand:this.addForm.projectDemand,
              hospitalFiles:list.join(",")
            });
//            axios.defaults.headers.post['Content-Type'] = 'text/html;charset=utf-8';
            axios.post("/hospital/addHospital",param).then((res)=>{
              if(res.data.code == "000000"){
                this.$Notice.success({title:"添加成功"});
                this.init();
              }else{
                this.$Notice.error({title:res.data.msg})
              }
            });
        },
        editok(){
          var qs = require("qs");
          var list = [];
          for(let i=0;i<this.uploadList1.length;i++){
            list.push(this.uploadList1[i].id)
          }
          var param = qs.stringify({
            hospitalName:this.editForm.hospitalName,
            pinyinName:this.editForm.pinyinName,
            provinceCd:this.editForm.provinceCd,
            cityCd:this.editForm.cityCd,
            areaCd:this.editForm.areaCd,
            level:this.editForm.level,
            validFlag:this.editForm.validFlag,
            reportTitle:this.editForm.reportTitle,
            reportDelivery:this.editForm.reportDelivery,
            dtlAddress:this.editForm.dtlAddress,
            testCenterId:this.editForm.testCenterId,
            legalPerson:this.editForm.legalPerson,//法人代表
            hospitalTel:this.editForm.hospitalTel,
            hospitalMaster:this.editForm.hospitalMaster,
            masterTel:this.editForm.masterTel,
            legalPersonName:this.editForm.legalPersonName,
            legalPersonSN:this.editForm.legalPersonSN,
            hospitalProperties:this.editForm.hospitalProperties,
            hospitalMode:this.editForm.hospitalMode,
            hospitalOffices:this.editForm.hospitalOffices.join(","),
            hospitalOfficesOther:this.editForm.hospitalOfficesOther,
            hospitalOfficesNumStr:this.editForm.hospitalOfficesNum,
            hospitalServiceNum:this.editForm.hospitalServiceNum,
            hospitalPatientNum:this.editForm.hospitalPatientNum,
            hospitalHIS:this.editForm.hospitalHIS,
            hospitalLIS:this.editForm.hospitalLIS,
            hospitalTest:this.editForm.hospitalTest,
            settlementMode:this.editForm.settlementMode,
            doctorDemand:this.editForm.doctorDemand,
            writeUser:this.editForm.writeUser,
            writeUserTel:this.editForm.writeUserTel,
            writeTimeStr:this.editForm.writeTime,
            projectDemand:this.editForm.projectDemand,
            hospitalFiles:list.join(","),
            id:this.editForm.id,
            samplingLocation:this.editForm.samplingLocation
          })
          axios.post("/hospital/updateHospital",param).then((res)=>{
            if(res.data.code == "000000"){
              this.$Notice.success({title:"编辑成功"});
              this.init();
            }else{
              this.$Notice.error({title:res.data.msg})
            }
          })
        },
        filterMethod (data, query) {
          return data.label.indexOf(query) > -1;
        },
        doctorok(){
          // if(this.doctorData2.join(",")){
          //   this.doctorTips = true;
          // }else{
          //   this.$Notice.error({title:"分配的医生不能为空"})
          // }
        },
        nurseok(){
          if(this.nurseData2.join(",")){
            this.nurseTips = true;
          }else{
            this.$Notice.error({title:"分配的护士不能为空"})
          }
        },
        nurseChange(newTargetKeys){
          console.log(newTargetKeys)
          this.nurseData2 = newTargetKeys;
        },
        nurseTipsOk(){
          var qs = require("qs");
          var param = qs.stringify({
            hospitalId:this.nurseMsg.id,
            hospitalName:this.nurseMsg.name,
            userIdArrayStr:this.nurseData2.join(",")
          })
          axios.post("/hospital/allotNurseToBusHospital",param).then((res)=>{
            if(res.data.code == "000000"){
              this.$Notice.success({title:"分配成功"});
              this.init();
            }else{
              this.$Notice.error({title:res.data.msg})
            }
          })
        },
        logisticsok(){
          if(this.logisticsData2.join(",")){
            this.logisticsTips = true;
          }else{
            this.$Notice.error({title:"分配的物流人员不能为空"})
          }
        },
        logisticsChange(newTargetKeys){
          this.logisticsData2 = newTargetKeys;
        },
        logisticsTipsOk(){
          var qs = require("qs");
          var param = qs.stringify({
            hospitalId:this.logisticsMsg.id,
            hospitalName:this.logisticsMsg.name,
            userIdArrayStr:this.logisticsData2.join(",")
          })
          axios.post("/hospital/allotCourierToBusHospital",param).then((res)=>{
            if(res.data.code == "000000"){
              this.$Notice.success({title:"分配成功"});
              this.init();
            }else{
              this.$Notice.error({title:res.data.msg})
            }
          })
        },
        uploadSucc(response, file, fileList){
          this.addForm.productFirstPic = response.data;
          this.pic = false;
        },
        fileList(file,fileList){
//          console.log(file);
          console.log(fileList)
          this.fileLists = fileList;
        },
        selectOffice(s){
          console.log(s)
        },
        handleView (name) {
          console.log(name)
          this.imgName = name.response.data.fileUrl;
          this.visible = true;
        },
        handleRemove (file) {
          const fileList = this.$refs.upload.fileList;
          this.$refs.upload.fileList.splice(fileList.indexOf(file), 1);
        },
        handleView1 (name) {
          console.log(name)
          this.imgName = name.fileUrl;
          this.visible = true;
        },
        handleRemove1 (file) {
//          console.log(file)
          const fileList = this.uploadList1;
//          console.log(fileList)
          this.uploadList1.splice(fileList.indexOf(file), 1);
          console.log(this.uploadList1)
        },
        handleSuccess1(res, file) {
          console.log(file)
          console.log(res)
          this.uploadList1.push(file.response.data)
        },

        handleSuccess(res, file) {
          console.log(file)
          console.log(res)
        },
        addDoctorForHospital:function () {
          let _this = this;
          let param =qs.stringify({
            userName:this.addDoctor.doctorName,
            phone:this.addDoctor.doctorPhone,
            hospitalId:this.addDoctor.hospitalId,
            subjectId:this.addDoctor.offices
          });
          addDoctor(param).then((result)=>{
            console.log(result)
            if(result.code == '000000'){
              _this.$Notice.success({title:"添加成功"});
              _this.getDoctorList();
            }else{
              _this.$Notice.error({title:result.msg});
            }
          })
        },
        getDoctorList:function () {
          let _this = this;
          _this.doctorLoading = true;
          let param =qs.stringify({
            hospitalId:this.addDoctor.hospitalId
          });
          getDoctorByHospital(param).then((result)=>{
            //console.log(result)
            if(result.code == '000000'){
              _this.doctorList = result.data;
              _this.doctorLoading = false;
            }else{
              _this.$Notice.error({title:result.msg});
            }
          })
        }
        // projectok(){
        //   if(this.projectData2.join(",")){
        //     this.projectTips = true;
        //   }else{
        //     this.$Notice.error({title:"分配的护士不能为空"})
        //   }
        // },
        // projectChange(newTargetKeys){
        //   this.projectData2 = newTargetKeys;
        // },
        // projectTipsOk(){
        //   var qs = require("qs");
        //   var param = qs.stringify({
        //     hospitalId:this.projectMsg.id,
        //     projectIdStr:this.projectData2.join(",")
        //   })
        //   axios.post("hospital/saveHospitalProject",param).then((res)=>{
        //     if(res.data.code == "000000"){
        //       this.$Notice.success({title:"添加成功"});
        //       this.init();
        //     }else{
        //       this.$Notice.error({title:res.data.msg})
        //     }
        //   })
        // }
      }
    }
</script>
<style scoped>
  .demo-upload-list{
    display: inline-block;
    width: 60px;
    height: 60px;
    text-align: center;
    line-height: 60px;
    border: 1px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    position: relative;
    box-shadow: 0 1px 1px rgba(0,0,0,.2);
    margin-right: 4px;
  }
  .demo-upload-list img{
    width: 100%;
    height: 100%;
  }
  .demo-upload-list-cover{
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.6);
  }
  .demo-upload-list:hover .demo-upload-list-cover{
    display: block;
  }
  .demo-upload-list-cover i{
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    margin: 0 2px;
  }
@media (max-width:992px) {
  .buttonAlign{
    text-align: center;
  }
}
</style>
